<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>dadi.Demographics2D</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://dadi.googlecode.com">dadi</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="dadi-module.html">Package&nbsp;dadi</a> ::
        Module&nbsp;Demographics2D
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="dadi.Demographics2D-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module Demographics2D</h1><p class="nomargin-top"><span class="codelink"><a href="dadi.Demographics2D-pysrc.html">source&nbsp;code</a></span></p>
<pre class="literalblock">

Two population demographic models.

</pre>

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dadi.Demographics2D-module.html#snm" class="summary-sig-name">snm</a>(<span class="summary-sig-arg">notused</span>,
        <span class="summary-sig-arg">ns</span>,
        <span class="summary-sig-arg">pts</span>)</span><br />
      ns = (n1,n2)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dadi.Demographics2D-pysrc.html#snm">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dadi.Demographics2D-module.html#bottlegrowth" class="summary-sig-name">bottlegrowth</a>(<span class="summary-sig-arg">params</span>,
        <span class="summary-sig-arg">ns</span>,
        <span class="summary-sig-arg">pts</span>)</span><br />
      params = (nuB,nuF,T)
ns = (n1,n2)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dadi.Demographics2D-pysrc.html#bottlegrowth">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dadi.Demographics2D-module.html#bottlegrowth_split" class="summary-sig-name">bottlegrowth_split</a>(<span class="summary-sig-arg">params</span>,
        <span class="summary-sig-arg">ns</span>,
        <span class="summary-sig-arg">pts</span>)</span><br />
      params = (nuB,nuF,T,Ts)
ns = (n1,n2)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dadi.Demographics2D-pysrc.html#bottlegrowth_split">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dadi.Demographics2D-module.html#bottlegrowth_split_mig" class="summary-sig-name">bottlegrowth_split_mig</a>(<span class="summary-sig-arg">params</span>,
        <span class="summary-sig-arg">ns</span>,
        <span class="summary-sig-arg">pts</span>)</span><br />
      params = (nuB,nuF,m,T,Ts)
ns = (n1,n2)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dadi.Demographics2D-pysrc.html#bottlegrowth_split_mig">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dadi.Demographics2D-module.html#split_mig" class="summary-sig-name">split_mig</a>(<span class="summary-sig-arg">params</span>,
        <span class="summary-sig-arg">ns</span>,
        <span class="summary-sig-arg">pts</span>)</span><br />
      params = (nu1,nu2,T,m)
ns = (n1,n2)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dadi.Demographics2D-pysrc.html#split_mig">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="split_mig_mscore"></a><span class="summary-sig-name">split_mig_mscore</span>(<span class="summary-sig-arg">params</span>)</span><br />
      ms core command for split_mig.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dadi.Demographics2D-pysrc.html#split_mig_mscore">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dadi.Demographics2D-module.html#IM" class="summary-sig-name">IM</a>(<span class="summary-sig-arg">params</span>,
        <span class="summary-sig-arg">ns</span>,
        <span class="summary-sig-arg">pts</span>)</span><br />
      ns = (n1,n2)
params = (s,nu1,nu2,T,m12,m21)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dadi.Demographics2D-pysrc.html#IM">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="IM_mscore"></a><span class="summary-sig-name">IM_mscore</span>(<span class="summary-sig-arg">params</span>)</span><br />
      ms core command for IM.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dadi.Demographics2D-pysrc.html#IM_mscore">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dadi.Demographics2D-module.html#IM_pre" class="summary-sig-name">IM_pre</a>(<span class="summary-sig-arg">params</span>,
        <span class="summary-sig-arg">ns</span>,
        <span class="summary-sig-arg">pts</span>)</span><br />
      params = (nuPre,TPre,s,nu1,nu2,T,m12,m21)
ns = (n1,n2)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dadi.Demographics2D-pysrc.html#IM_pre">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="IM_pre_mscore"></a><span class="summary-sig-name">IM_pre_mscore</span>(<span class="summary-sig-arg">params</span>)</span><br />
      ms core command for IM_pre.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dadi.Demographics2D-pysrc.html#IM_pre_mscore">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'dadi'"><code class="variable-quote">'</code><code class="variable-string">dadi</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="snm"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">snm</span>(<span class="sig-arg">notused</span>,
        <span class="sig-arg">ns</span>,
        <span class="sig-arg">pts</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dadi.Demographics2D-pysrc.html#snm">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

ns = (n1,n2)

Standard neutral model, populations never diverge.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="bottlegrowth"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">bottlegrowth</span>(<span class="sig-arg">params</span>,
        <span class="sig-arg">ns</span>,
        <span class="sig-arg">pts</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dadi.Demographics2D-pysrc.html#bottlegrowth">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

params = (nuB,nuF,T)
ns = (n1,n2)

Instantanous size change followed by exponential growth with no population
split.

nuB: Ratio of population size after instantanous change to ancient
     population size
nuF: Ratio of contempoary to ancient population size
T: Time in the past at which instantaneous change happened and growth began
   (in units of 2*Na generations) 
n1,n2: Sample sizes of resulting Spectrum
pts: Number of grid points to use in integration.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="bottlegrowth_split"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">bottlegrowth_split</span>(<span class="sig-arg">params</span>,
        <span class="sig-arg">ns</span>,
        <span class="sig-arg">pts</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dadi.Demographics2D-pysrc.html#bottlegrowth_split">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

params = (nuB,nuF,T,Ts)
ns = (n1,n2)

Instantanous size change followed by exponential growth then split.

nuB: Ratio of population size after instantanous change to ancient
     population size
nuF: Ratio of contempoary to ancient population size
T: Time in the past at which instantaneous change happened and growth began
   (in units of 2*Na generations) 
Ts: Time in the past at which the two populations split.
n1,n2: Sample sizes of resulting Spectrum
pts: Number of grid points to use in integration.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="bottlegrowth_split_mig"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">bottlegrowth_split_mig</span>(<span class="sig-arg">params</span>,
        <span class="sig-arg">ns</span>,
        <span class="sig-arg">pts</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dadi.Demographics2D-pysrc.html#bottlegrowth_split_mig">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

params = (nuB,nuF,m,T,Ts)
ns = (n1,n2)

Instantanous size change followed by exponential growth then split with
migration.

nuB: Ratio of population size after instantanous change to ancient
     population size
nuF: Ratio of contempoary to ancient population size
m: Migration rate between the two populations (2*Na*m).
T: Time in the past at which instantaneous change happened and growth began
   (in units of 2*Na generations) 
Ts: Time in the past at which the two populations split.
n1,n2: Sample sizes of resulting Spectrum
pts: Number of grid points to use in integration.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="split_mig"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">split_mig</span>(<span class="sig-arg">params</span>,
        <span class="sig-arg">ns</span>,
        <span class="sig-arg">pts</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dadi.Demographics2D-pysrc.html#split_mig">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

params = (nu1,nu2,T,m)
ns = (n1,n2)

Split into two populations of specifed size, with migration.

nu1: Size of population 1 after split.
nu2: Size of population 2 after split.
T: Time in the past of split (in units of 2*Na generations) 
m: Migration rate between populations (2*Na*m)
n1,n2: Sample sizes of resulting Spectrum
pts: Number of grid points to use in integration.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="IM"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">IM</span>(<span class="sig-arg">params</span>,
        <span class="sig-arg">ns</span>,
        <span class="sig-arg">pts</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dadi.Demographics2D-pysrc.html#IM">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

ns = (n1,n2)
params = (s,nu1,nu2,T,m12,m21)

Isolation-with-migration model with exponential pop growth.

s: Size of pop 1 after split. (Pop 2 has size 1-s.)
nu1: Final size of pop 1.
nu2: Final size of pop 2.
T: Time in the past of split (in units of 2*Na generations) 
m12: Migration from pop 2 to pop 1 (2*Na*m12)
m21: Migration from pop 1 to pop 2
n1,n2: Sample sizes of resulting Spectrum
pts: Number of grid points to use in integration.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="IM_pre"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">IM_pre</span>(<span class="sig-arg">params</span>,
        <span class="sig-arg">ns</span>,
        <span class="sig-arg">pts</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dadi.Demographics2D-pysrc.html#IM_pre">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

params = (nuPre,TPre,s,nu1,nu2,T,m12,m21)
ns = (n1,n2)

Isolation-with-migration model with exponential pop growth and a size change
prior to split.

nuPre: Size after first size change
TPre: Time before split of first size change.
s: Fraction of nuPre that goes to pop1. (Pop 2 has size nuPre*(1-s).)
nu1: Final size of pop 1.
nu2: Final size of pop 2.
T: Time in the past of split (in units of 2*Na generations) 
m12: Migration from pop 2 to pop 1 (2*Na*m12)
m21: Migration from pop 1 to pop 2
n1,n2: Sample sizes of resulting Spectrum
pts: Number of grid points to use in integration.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://dadi.googlecode.com">dadi</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    <a href="epydoc-log.html">Generated by Epydoc
    3.0.1 on Fri Dec 14 15:16:34 2012</a>
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
